package com.hornsun.domain.constant.types;

/**
 * Created by 编译中... on 2018/5/2.
 */
public enum  BoundType {
    EXIST(1,"已存在未绑定"),
    UNEXIST(2,"不存在"),
    BOUNDED(3,"已绑定");

    private Integer type;
    private String name;

    BoundType(Integer type ,String name){this.type=type;this.name=name;}

    public Integer getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public static BoundType fromName(String name) {
        for (BoundType boundType : values()) {
            if (boundType.name.equals(name)){
                return boundType;
            }
        }
        return null;
    }
}
